module Main where

main::IO()
main = do
	n<-readLn
	print(f n)
	
f::[Int] -> [Int]
f [] = []
f (x:xs) = if (x>0) then (f(xs)++[x]) else (f(xs))